package fei.zhou.springboot1.business.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import lombok.Data;

@Component
@Data
public class Person2 {
    // 从环境变量、配置文件中获取值
    @Value("${person.lastName}")
    private String lastName;
    
    // #{SpEL}
    @Value("#{2*2}")
    private Integer age;
    
    // 字面量
    @Value("false")
    private Boolean boss;
    
}